<?php
namespace app\web\model;

use think\Model;

class Admin extends Model{


    /**
     * 通过token返回管理员信息
     * @param $token
     * @return array|false|mixed|null|\PDOStatement|string|Model
     */
    public function getInfoByToken($token){
        return $this->where('token',$token)
            ->alias('t1')
            ->field('t1.*')
            ->find();
    }
}
